-- GENERATED SPELL FOR [Dalaran Mage] --


function spell0_1914(pUnit, Event) --@Fire Shield,n/a--
pUnit:FullCastSpellOnTarget(134,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1914', 1000, 1)
end

function spell1_1914(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(20793,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1914', 3000, 1)
end

function spell2_1914(pUnit, Event) --@Quick Flame Ward,n/a--
pUnit:FullCastSpellOnTarget(4979,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1914', 11500, 1)
end

function Sorts_1914(pUnit, Event)
local choix_sorts_1914 = math.random(0, 2)
if choix_sorts_1914 == 0 then
pUnit:RegisterEvent('spell0_1914', 1, 1)
end
if choix_sorts_1914 == 1 then
pUnit:RegisterEvent('spell1_1914', 1, 1)
end
if choix_sorts_1914 == 2 then
pUnit:RegisterEvent('spell2_1914', 1, 1)
end
end

function mob1914_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_1914', math.random(1500, 3000), 1)
end

function mob1914_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1914_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1914_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(1914, 1, 'mob1914_Action')
RegisterUnitEvent(1914, 2, 'mob1914_Leave')
RegisterUnitEvent(1914, 3, 'mob1914_Kill')
RegisterUnitEvent(1914, 4, 'mob1914_Die')
